package com.consumer.handsome.utils;

import org.springframework.http.MediaType;

public class MediaTypeUtil {
    public static MediaType resolveImageMediaType(String imageFormat) {
        switch (imageFormat.toLowerCase()) {
            case "jpeg":
                return MediaType.IMAGE_JPEG;
            case "png":
                return MediaType.IMAGE_PNG;
            case "jpg":
                return MediaType.IMAGE_JPEG;
            default:
                return MediaType.APPLICATION_OCTET_STREAM;
        }
    }
}
